@extends('admin.layout.index')

@section('content')
	<div class="col-lg-12">
	    <div class="card">
	        <div class="card-action">
	            友情连接修改
	        </div>
	        <div class="card-content">
	            <form class="col s12" method="post" action="/admin/link/updates" enctype="multipart/form-data">
	            	{{ csrf_field() }}
	                <div class="row">
	                	<span style="font-size:14px;color:#aaa">开通的天数:</span>
	                    <div class="input-field col s12">
	                        <input id="type" type="text" class="validate" name="timelength" value="{{ $data['timelength'] }}"  id="mima_mima">
	                        <label for="type" class="">
	                            <span style="font-size:14px"></span>
	                        </label>
	                    </div>
	                </div>
					@if($data['mode'] == 1)
	                <div class="row">
	                	<span style="font-size:14px;color:#aaa">文字链接标题：</span>
	                    <div class="input-field col s12">
	                        <input id="address" type="text" class="validate" name="words" value="{{ $data['words'] }}"  id="mima_mima">
	                        <label for="address" class="">
	                            
	                        </label>
	                    </div>
	                </div>
					@elseif($data['mode'] == 2)
	                <div class="file-field input-field">
				      	<div class="btn">
				       		<span>File</span>
				        	<input type="file" multiple name="image" value="{{ $data['image'] }}">
				     	</div>			     	
				      	<div class="file-path-wrapper">
				        	<input class="file-path validate" type="text" name="image" value="{{ $data['image'] }}" placeholder="选择上传的图片连接">
				      	</div>
	   				</div>
					@endif

	   				<div class="row">
		   				<span style="font-size:14px;color:#aaa">链接地址：</span>
	                    <div class="input-field col s12">
	                        <input id="address" type="text" class="validate" name="url" value="{{ $data['url'] }}"  id="mima_mima">
	                        <label for="address" class="">
	                            <span style="font-size:14px"></span>
	                        </label>
	                    </div>
	                </div>
	   				<div class="row">
		   				<span style="font-size:14px;color:#aaa">链接描述：</span>
	                    <div class="input-field col s12">
	                        <input id="address" type="text" class="validate" name="contents" value="{{ $data['contents'] }}"  id="mima_mima">
	                        <label for="address" class="">
	                            
	                        </label>
	                    </div>
	                </div>
	                <div class="row">
		                <div class="input-field col s6">
			                <input type="hidden" name="id" value="{{ $data['id'] }}">　
							<input type="submit" value="修改" style="width:150px;height:50px;font-weight:bold;font-size:16px;color:#333;margin-left:30px">
							<input type="reset" value="重置" style="width:150px;height:50px;font-weight:bold;font-size:16px;color:red;margin-left:30px">
	                	</div>
	                </div>
	            </form>
	        </div>
	    </div>
	</div>
@endsection

